class Attachment < ActiveRecord::Base
  belongs_to :post
  
  MAX_SIZE = 1.megabyte
  has_attachment :storage => :file_system, :path_prefix => 'public/upload',
                 :max_size => MAX_SIZE
  
  validates_as_attachment
  
end